<include file="Core:Public:header" />
{:W('Navigation')}
<script src="__PUBLIC__/js/datepicker/WdatePicker.js"></script>
<div class="body-right">
	<div class="row-table">
		<div class="row-table-title">考勤月报表</div>
		<div class="row-table-body">
			<p class="form-title">考勤月报表
				<form name="form1" action="{:U('hrm/attendancesheet/monthly')}" method="post">
					<div class="form-inline">
						选择对象:<input type="text" name="user_name" class="form-control" id="to_name" value="{$_POST['user_name']}" placeHolder="支持模糊搜索..."/>
						<a href="javascript:void(0);"><img src="__PUBLIC__/img/search.png" width="25px" id="user_search" /></a>
						<input type="checkbox" name="status[]" checked="checked" value="1"/>在职&nbsp;&nbsp;
						<input type="checkbox" name="status[]" checked="checked" value="2"/>离职&nbsp;&nbsp;
						<input type="checkbox" name="status[]" checked="checked" value="3"/>退休&nbsp;&nbsp;
						日期:
						<input type="text" name="start_time" class="form-control" onclick="WdatePicker({dateFmt:'yyyy-MM'})" value="{$_POST['start_time']|default = date('Y-m')}"/>&nbsp;&nbsp;
						<span><input type="submit" class="btn btn-primary" value="查询"/></span>
					</div>
				</form>
			</p>
			<if condition="empty($monthly)">
				<div>---暂无数据---</div>
			<else />
			<form class="form-horizontal " id="form1"  method="post">
				<table class="table" style="margin-bottom:0px;">
					<tbody>
						<tr>
							<th>姓名</th>
							<th>月份</th>
							<th>请假</th>
							<th>加班</th>
							<th>调休</th>
							<th>应上</th>
						</tr>
						<volist name="monthly" id="vo">
						<tr>
							<td>{$vo.name}</td>
							<td>{$_POST['start_time']}</td>
							<td>
								<a href="javascript:void(0);" class="show_tips" data-content="事假：{$vo.leave_casual_counts}次<br />病假：{$vo.leave_sick_counts}次<br />出差：{$vo.leave_business_counts}次<br />婚假：{$vo.leave_marry_counts}次<br />产假：{$vo.leave_maternity_counts}次<br />年假：{$vo.leave_annual_counts}次<br />丧假：{$vo.leave_funeral_counts}次<br />累计：{$vo.leave_all_hours}小时">{$vo.leave_all_counts}次</a>
							</td>
							<td>
								<a href="javascript:void(0);" class="show_tips" data-content="正常加班：{$vo.overtime_normal_counts}<br />周末加班：{$vo.overtime_weekends_counts}<br />节假日加班：{$vo.overtime_holiday_counts}<br />累计：{$vo.overtime_all_hours}小时">{$vo.overtime_all_counts}次</a>
							</td>
							<td>
								<a href="javascript:void(0);" class="show_tips" data-content="加班调休：{$vo.lieu_overtime_counts}<br />年假调休：{$vo.lieu_annual_counts}<br />累计：{$vo.lieu_all_hours}小时">{$vo.lieu_all_counts}次</a>
							</td>
							<td>{$vo.should_work_hours}小时</td>
						</tr>
						</volist>
					</tbody>
					<tfoot>
						<tr>
							<td colspan="10" align="center">{$page}<div class="clear"></div></td>
						</tr>
					</tfoot>
				</table>
			</form>
			</if>
		</div>
	</div>
</div>
<div class="clear"></div>
<script type="text/javascript">
	/**
	 * 选择对象
	 **/
	$('#user_search').click(function(){
		$('#alert').modal({
			show:true,
			remote:'{:U("core/user/getuserrindex","self=1")}'
		});
	});
	
	$('.show_tips').popover({
		html:true,
		trigger:'hover'
	});
	

</script>
<include file="Core:Public:alert" />
<include file="Core:Public:footer" />